import java.io.*;
import java.net.*;
public class Server_Main {
  public static void main (String args []) {
   String [] answer = {"*********"};
   ServerSocket serverForClient_Main = null;
   Socket socketOnServer = null;
   DataOutputStream out = null;
   DataInputStream in = null;
   try {  serverForClient_Main = new ServerSocket(2010);
      }
   catch(IOException el) {
       System.out.println(el);
    }
   try{   System.out.println("等待客户呼叫");
       socketOnServer = serverForClient_Main.accept();
       out = new DataOutputStream(socketOnServer.getOutputStream());
       in = new DataInputStream(socketOnServer.getInputStream());
       for(int i=0;i<answer.length;i++){
          String s = in.readUTF();
          System.out.println("服务器收到客户的提问:"+s);
          out.writeUTF(answer[i]);
          Thread.sleep(500);
        }
      }
      catch(Exception e) {
          System.out.println("客户已断开"+e);
        }
      }
    }